int main() {
  Str s("hello");
  Str *ps = new Str("whassup");
}

s gets its destructor called, ps doesn't cause it's a pointer to a class, not the class itself.

3 PILLARS OF C++